package com.xxxx.utils;

import java.util.Date;

/**
 * @Author Lionel
 * @Date 2021/3/11 16:52
 * Created by IntelliJ IDEA 2020.1.
 * Project: house
 * Description：计算两个日期之间的天数
 */
public final class CalcDate {
    public static int calcDays (Date begin, Date end) {
        int days = 0;
        if (end == null) {
            days = 9999;
        } else {
            days = (int) ((end.getTime() - begin.getTime()) / (1000*3600*24));
        }
        return days;
    }
}
